<?php

require_once 'init.php';

$page = cf\api\page\get('catalog');
$smarty->assign('page',$page);
$smarty->assign('pageText',cf\api\page\getText($page['id']));
$pageId = $page['id'];

$categories = cf\api\shop\getCategoriesTree();
$smarty->assign('categories', $categories);

$products = new cf\Products('hits');
$smarty->assign('products', $products->getList());

show(
	'catalog', 
	$page['name'], 
	array(), 
	$page['title'], 
	$page['keywords'], 
	$page['descr']
);
?>